using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using RealState.BusinessObjects;
using RealState.DAL;

namespace RealState.BLL
{
	public class UserContentsBLL
	{
		private UserContentsDAO _UserContentsDAO;

		public UserContentsDAO UserContentsDAO
		{
			get { return _UserContentsDAO; }
			set { _UserContentsDAO = value; }
		}

		public UserContentsBLL()
		{
			UserContentsDAO = new UserContentsDAO();
		}
		public List<UserContents> GetUserContentss()
		{
			try
			{
				return UserContentsDAO.GetUserContentss();
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public UserContents GetUserContents(int ContentId)
		{
			try
			{
				return UserContentsDAO.GetUserContents(ContentId);
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public int AddUserContents(UserContents oUserContents)
		{
			try
			{
				return UserContentsDAO.AddUserContents(oUserContents);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int UpdateUserContents(UserContents oUserContents)
		{
			try
			{
				return UserContentsDAO.UpdateUserContents(oUserContents);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveUserContents(UserContents oUserContents)
		{
			try
			{
				return UserContentsDAO.RemoveUserContents(oUserContents);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveUserContents(int ContentId)
		{
			try
			{
				return UserContentsDAO.RemoveUserContents(ContentId);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public List<UserContents> DeserializeUserContentss(string Path)
		{
			try
			{
				return GenericXmlSerializer<List<UserContents>>.Deserialize(Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public void SerializeUserContentss(string Path, List<UserContents> UserContentss)
		{
			try
			{
				GenericXmlSerializer<List<UserContents>>.Serialize(UserContentss, Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
	}
}
